#ifndef __SYS_H
#define __SYS_H

#ifdef __cplusplus
extern "C"
{
#endif
/* Includes ------------------------------------------------------------------*/
#include "MS51_16K.H"

/* Exported macro ------------------------------------------------------------*/
#define FSYS_HXT 0
#define FSYS_LXT 1
#define FSYS_HIRC 2
#define FSYS_LIRC 3
#define FSYS_OSCIN_P30 4
#define FSYS_HXTIN_P00 5
#define HIRC_24 6
#define HIRC_16 7
#define HIRC_166 8
#define HIRC_24 6
#define HIRC_16 7
#define HIRC_166 8

/* Exported types ------------------------------------------------------------*/
extern bit BIT_TMP;
extern unsigned char data TA_REG_TMP, BYTE_TMP;

/* Exported functions ------------------------------------------------------- */
void FsysSelect(unsigned char u8FsysMode);
void ClockEnable(unsigned char u8FsysMode);
void ClockDisable(unsigned char u8FsysMode);
void ClockSwitch(unsigned char u8FsysMode);
void MODIFY_HIRC(unsigned char u8HIRCSEL);

#ifdef __cplusplus
}
#endif

#endif
